<template>
    <el-timeline :reverse="false" style="padding: 0;">
        <el-timeline-item
                v-for="(item, index) in activities"
                :key="index"
                placement="top"
                :timestamp="item.timestamp">
            <div v-html="item.content">

            </div>
        </el-timeline-item>
    </el-timeline>
</template>

<script>
export default {
    name: "client_history",
    props: {
        clientInfo: {
            type: Object,
            default: () => {}
        }
    },
    data() {
        return {
            tabsCurrent: 'first',
            activities: []
        }
    },
    mounted() {
        let that = this

        that.$request("/clientHistory/getClientFollow/"+that.clientInfo.clientId, "POST").then((data) => {
            let dataSource = data.data

            let activities = []
            dataSource.map((item) => {
                let content = `<div style="color: #8c939d;margin-bottom: 15px;font-size: 12px">操作人:${item.empName}</div>
                    <div>${item.description}</div>`

                activities.push({
                    content: content,
                    timestamp: that.$moment(item.createTime).format('YYYY-MM-DD HH:mm:ss')
                })
            })

            that.activities = [...activities]
        })
    }
}
</script>

<style>
.deleteBorder .el-tabs__nav-wrap::after{
    display: none;
}
.deleteBorder .el-tabs__active-bar{
    background: transparent;
}
</style>
<style scoped>
</style>
